wayland: Stop accessing GdkDrag members
authorMatthias Clasen <mclasen@redhat.com>
Sun, 15 Jul 2018 20:06:55 +0000 (16:06 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 15 Jul 2018 20:43:28 +0000 (16:43 -0400)
gdk/wayland/gdkdrag-wayland.c

index 5c5e286764b63387a13390ef0cddc21c2127b2fb..3d9a7a0e7d4371744d5018d19f5492db908d6689 100644 (file)
@@ -374,9 +374,10 @@ _gdk_wayland_surface_drag_begin (GdkSurface         *surface,
   drag_wayland = g_object_new (GDK_TYPE_WAYLAND_DRAG,
                                "device", device,
                                "content", content,
+                               "surface", surface,
                                NULL);
+
   drag = GDK_DRAG (drag_wayland);
-  drag->source_surface = g_object_ref (surface);
 
   drag_wayland->dnd_surface = create_dnd_surface (gdk_surface_get_display (surface));
   drag_wayland->dnd_wl_surface = gdk_wayland_surface_get_wl_surface (drag_wayland->dnd_surface);